<!DOCTYPE html>

<html>
<head>
  <title>Beego</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </style>
</head>

<body>

  
  <header>
    <h1 class="logo" style="color: blue;">名字：<label id="username"></label></h1><br>
    <h1 class="logo" style="color: blue;">学号：<label id="sn"></label></h1><br>
    <h1 class="logo" style="color: blue;">性别：<label id="sex"></label></h1><br>
    <h1 class="logo" style="color: blue;">密码：<label id="pswd"></label></h1><br>
    <div class="description">
      Beego is a simple & powerful Go web framework which is inspired by tornado and sinatra.
    </div>
  </header>
  <footer>
    <div class="author">
      Official website:
      <a href="http://{{.Website}}">{{.Website}}</a> /
      Contact me:
      <a class="email" href="mailto:{{.Email}}">{{.Email}}</a>
    </div>
  </footer>
  <div class="backdrop"></div>

 <script>
  function getInfo(){
    let userinfo = localStorage.getItem("userinfo");
    if(userinfo == null){
      alert("本页面需要先登录");
      window.location.href = "/login";
      return
    }
    let user = JSON.parse(userinfo);
    document.getElementById("username").textContent = user.Name;
    document.getElementById("sn").textContent = user.Sn;
    document.getElementById("sex").textContent = user.Sex;
    document.getElementById("pswd").textContent = user.Pswd;
  }
  getInfo()
 </script>

  <script src="/static/js/reload.min.js"></script>
</body>
</html>